package com.grf.controller;

import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 登录
 * @author: guorf
 * @date: 2024/8/6
 */
@RestController

public class LoginController {

    // private final AuthenticationManager authenticationManager;
    //
    // public LoginController(AuthenticationManager authenticationManager) {
    //     this.authenticationManager = authenticationManager;
    // }
    //
    // @PostMapping("/login")
    // public ResponseEntity<Void> login(@RequestBody LoginRequest loginRequest) {
    //     Authentication authenticationRequest =
    //             UsernamePasswordAuthenticationToken.unauthenticated(loginRequest.username(), loginRequest.password());
    //     Authentication authenticationResponse =
    //             this.authenticationManager.authenticate(authenticationRequest);
    //     return authenticationResponse.isAuthenticated() ? ResponseEntity.ok().build() : ResponseEntity.status(401).build();
    // }
    //
    // public record LoginRequest(String username, String password) {
    // }

}
